<?php
$q=$_GET['q'];
$hint='';
$ele=explode("_",$q);
$Access_Type=$ele[1];
$NIC_Number=$ele[2];
include_once '../Login/databaseconnection.php';
$hint='';
if($q!="")
{
$all_exam_names=mysql_query("SELECT DISTINCT(Exam_Name) FROM exam");
if($all_exam_names)
{
$all_exam_subjects=mysql_query("SELECT DISTINCT(Subject) FROM exam");
$hint=$hint.'<div id="modal"><div id="heading">Please select the Exam name and Year!<a href="'.$basedir.'/Exams/Exams.php" class="Get_Year red close">Exit</a></div><div id="Get_Year_results">';
$all_exam_years=mysql_query("SELECT DISTINCT(Year) FROM exam");
if($all_exam_years)
{
$hint=$hint.'<div><form action="#" method="POST" name="graph_inp"><table><tr><td></td><td></td><td></td><td></td></tr>
<tr><td></td><td><label>If you want analyse in a zone</label><input type="text" name="Zone" id="Zone" value="Type the zone" size="20" style="background-color:#CCC" onKeyUp="showHint(this.value,this.name)" onClick="cleartbox(this.name)"/></td><td><label>If you want analyse in a district</label><input type="text" name="District" id="District" style="background-color:#CCC" value="Type the district" size="20" onClick="cleartbox(this.name)" onKeyUp="showHint(this.value,this.name)"/></td><td></td></tr></table>
<div id="exam_nam"><table><tr><td></td><td>Exam name: </td><td><select name="Exam_Name" onChange="getExaSubject(this.value)" disabled="disabled"><option value="Select One">Select One</option>';
while($row_res=mysql_fetch_array($all_exam_names))
{
$Exam_Name=$row_res['Exam_Name'];
$hint=$hint.'<option value="'.$Exam_Name.'">'.$Exam_Name.'</option>';
}
$hint=$hint.'</select></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr></table></div>
<div id="exam_Subject"><table><tr><td></td><td>Subject: </td><td><select name="Subject" onChange="get_Okbutton(this.value)" disabled="disabled"><option value="Select One">Select One</option>';
while($row_Subject=mysql_fetch_array($all_exam_subjects))
{
$Subject=$row_Subject['Subject'];
$hint=$hint.'<option value="'.$Subject.'">'.$Subject.'</option>';
}
$hint=$hint.'</select></td><td></td></tr><tr><td></td><td></td><td></td><td></td></tr></table></div><div id="ok"></div></form><div><div class="suggestionList" id="List"></div>';
}
}
$hint=$hint.'</div></div>';
}
if($hint=="")
{
$response='';
}
else
{
$response=$hint;
}
echo $response;
?>